//
//  GridCell.swift
//  CollectionView
//
//  Created by SuXinDe on 2019/2/21.
//  Copyright © 2019 su xinde. All rights reserved.
//

import UIKit

class GridCell: UICollectionViewCell {
    lazy var imageView: UIImageView = {
        var view = UIImageView()
        return view
    }()
    
    lazy var label: UILabel = {
        var view = UILabel()
        view.textAlignment = .center
        return view
    }()
    
    override init(frame: CGRect) {
        super.init(frame: frame)
        contentView.addSubview(imageView)
        contentView.addSubview(label)
        imageView.snp.makeConstraints { (make) in
            make.top.left.right.equalToSuperview()
            make.bottom.equalToSuperview().offset(-20)
        }
        label.snp.makeConstraints { (make) in
            make.bottom.left.right.equalToSuperview()
            make.height.equalTo(20)
        }
    }
    
    required init?(coder aDecoder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
}
